Skip to content

Improve mypy type checking #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2023
Merged

Improve mypy type checking #82

merged 2 commits into from
May 5, 2023

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented May 3, 2023

This turns on most of the recommended mypy checks, and fixes a few things. There are two options that I've disabled in the config that I think would be more effor than they're worth to fix, because they involve interactions with stuff we're importing from outside packages that have incomplete typing.

Fixes #81

@dstansby dstansby marked this pull request as ready for review May 5, 2023 08:45
@dstansby dstansby requested review from samcunliffe and ruaridhg May 5, 2023 08:45
Copy link
Collaborator

@samcunliffe samcunliffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, unless you really don't want to fix the TODO: fix lines in which case I'd remove the TODOs.

@dstansby
Copy link
Member Author

dstansby commented May 5, 2023

I guess ideally we would fix them in the future, but they're not high priority now, which is why I put the TODOs there.

@samcunliffe samcunliffe added this pull request to the merge queue May 5, 2023
Merged via the queue into matplotlib:main with commit 6b99b20 May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add type checking to pre-commit hooks
2 participants